#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

#include "include/list_node.h"

int main(int argc, char *argv[]) {
    ListNode* head = ListNodeCreate(1, NULL);
    for (int i = 2; i <= 10; i++) head = ListNodeAdd(head, i);
    ListNodeString(head); 
    for (int i = 2; i <= 10; i++) head = ListNodeAdd(head, i);
    ListNodeString(head);

    head = ListNodeRemove(head, 3);
    ListNodeString(head); 

    head = ListNodeRemove(head, 7);
    ListNodeString(head);
    
    printf("%s\n", ListNodeContains(head, 10) == 1 ? "存在 value = 10 的节点" : "不存在 value = 10 的节点");
    printf("%s\n", ListNodeContains(head, 8) == 1 ? "存在 value = 8 的节点" : "不存在 value = 8 的节点");
    printf("%s\n", ListNodeContains(head, 100) == 1 ? "存在 value = 100 的节点" : "不存在 value = 100 的节点");

    ListNodeDestory(head); 
    return 0; 
}